﻿#ifndef WIDGETREADREQUEST_H
#define WIDGETREADREQUEST_H

#include <QWidget>
#include <QGroupBox>
#include <QLineEdit>
#include <QTextEdit>
#include <QPushButton>
#include <QCheckBox>
#include <QSpinBox>
#include <QComboBox>
#include <QHBoxLayout>
#include <QListWidget>
#include "ComCommon.h"


class WidgetReadRequest : public QWidget
{
    Q_OBJECT
public:
    explicit WidgetReadRequest(QWidget *parent = nullptr);

public:
    void setRequestData(const PLCRequestData& data);
    PLCRequestData getRequestData();
signals:

private:
    void setupUi();
    void initConnect();
    QString getTxt(int index);

public:
    QPushButton* pbtnAddrAdd;
    QPushButton* pbtnAddrRemove;
    QPushButton* pbtnAddrRemoveAll;
    QComboBox* cbboxRegisterType;
    QSpinBox* spboxReadAddrStart;
    QListWidget* lstwgtAddrList;

};

#endif // WIDGETREADREQUEST_H
